<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>学生注册</title>
    <!-- 引入样式（可优化为独立 CSS 文件） -->
    <style>
        .regist-container {
            width: 400px;
            margin: 50px auto;
            padding: 20px;
            background: #5b9bd5;
            border-radius: 10px;
            text-align: center;
            color: #fff;
        }
        .form-item {
            margin: 15px 0;
            text-align: left;
        }
        .form-item label {
            display: inline-block;
            width: 80px;
            text-align: right;
            margin-right: 10px;
        }
        .form-item input {
            width: 200px;
            padding: 5px;
            border: none;
            border-radius: 5px;
        }
        .btn-group {
            margin-top: 20px;
            text-align: center;
        }
        .btn {
            padding: 8px 20px;
            margin: 0 10px;
            border: none;
            border-radius: 5px;
            cursor: pointer;
            background: #fff;
            color: #5b9bd5;
        }
    </style>
</head>
<body>
<div class="regist-container">
    <h2>学生注册</h2>
    <!-- 表单提交到 Servlet（注意路径，需与 @WebServlet 注解匹配） -->
    <form action="/regist" method="post">
        <div class="form-item">
            <label for="stuid">学号：</label>
            <input type="text" id="stuid" name="stuid" placeholder="请输入学号" required>
        </div>
        <div class="form-item">
            <label for="password">密码：</label>
            <input type="password" id="password" name="password" placeholder="请输入密码" required>
        </div>
        <div class="form-item">
            <label for="confirmPwd">确认密码：</label>
            <input type="password" id="confirmPwd" name="confirmPwd" placeholder="请再次输入密码" required>
        </div>
        <div class="form-item">
            <label for="name">姓名：</label>
            <input type="text" id="name" name="name" placeholder="请输入姓名" required>
        </div>
        <div class="form-item">
            <label for="grade">年级：</label>
            <input type="text" id="grade" name="grade" placeholder="请输入年级" required>
        </div>
        <div class="form-item">
            <label for="clazz">班级：</label>
            <input type="text" id="clazz" name="clazz" placeholder="请输入班级" required>
        </div>
        <div class="btn-group">
            <button type="submit" class="btn">注册</button>
            <button type="reset" class="btn">重置</button>
        </div>
        <p>已有账号？<a href="login.jsp">去登录</a></p>
    </form>
</div>
</body>
</html>